﻿using Common.Enums;

using GameCommon.Base;
using GameCommon.Components;

namespace Menu.Screens
{
    public class ConnectionError : ScreenBase
    {
        public ConnectionError(IScreenChanger changer, object argument)
            : base(changer, argument)
        {
        }

        public override ScreenEnum Screen
        {
            get
            {
                return ScreenEnum.ConnectionError;
            }
        }

        public override void LoadContent()
        {
            base.LoadContent();

            this.Components = MenuLoader.Get(ScreenEnum.ConnectionError);
            this.AddScreen(ScreenEnum.MenuBackground);

            this.AddCommand("MainMenu", this.SwitchToMainManu);
        }

        private void SwitchToMainManu(GameComponent obj)
        {
            this.RemoveAnyScreen();
            this.AddScreen(ScreenEnum.MainMenu);
        }
    }
}